﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Users/Welcome.master" AutoEventWireup="true"
    CodeBehind="Account.aspx.cs" Inherits="Earworm.Web.Users.Account" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <asp:ScriptManager ID="ScriptManager" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <asp:TabContainer ID="TabContainer" runat="server" AutoPostBack="true" ActiveTabIndex="0"
                TabStripPlacement="Top" OnActiveTabChanged="TabContainer_ActiveTabChanged">
                <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TablPanel1" ScrollBars="Auto"
                    OnDemandMode="Once">
                    <HeaderTemplate>
                        User Profile</HeaderTemplate>
                    <ContentTemplate>
                        <asp:Label runat="server" ID="lFirstName" Text="First Name: "></asp:Label>
                        <asp:TextBox runat="server" ID="tbFirstName"></asp:TextBox>
                        <br />


                        <asp:Label runat="server" ID="lLastName" Text="Last Name: "></asp:Label>
                        <asp:TextBox runat="server" ID="tbLastName"></asp:TextBox>
                        <br />


                        <asp:Label runat="server" ID="lUserName" Text="UserName: "></asp:Label>
                        <asp:TextBox runat="server" ID="tbUserName"></asp:TextBox>
                        <br />

                        <asp:Label runat="server" ID="lEmail" Text="Email: "></asp:Label>
                        <asp:TextBox runat="server" ID="tbEmail"></asp:TextBox>
                        <br />
                        <asp:Button ID="btnSave" runat="server" OnClick="SaveUser_Click" Text="Save"/>
                        <br />
                        <asp:Label ID="lStatus" runat="server"></asp:Label>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel runat="server" HeaderText="TabPanel2" ID="TabPanel2" ScrollBars="Auto"
                    OnDemandMode="Always">
                    <HeaderTemplate>
                        Rating History</HeaderTemplate>
                    <ContentTemplate>
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" CellPadding="4"
                            BorderColor="Silver" DataSourceID="ldsRatings" AllowSorting="true" AlternatingRowStyle-BackColor="#09A5EC" BackColor="#DADADA" HeaderStyle-BackColor="#09A5EC" 
                            ForeColor="Black" Style="color:InfoText" DataKeyNames="UserKey">
                            <Columns>
                                <asp:HyperLinkField DataTextField="Song" NavigateUrl="#" HeaderText="SongTitle" SortExpression="Song" />
                                <asp:BoundField DataField="Album" HeaderText="Album" ReadOnly="True" SortExpression="Album" />
                                <asp:BoundField DataField="Artist" HeaderText="Artist" ReadOnly="True" SortExpression="Artist" />
                                <asp:BoundField DataField="Rating" HeaderText="Rating" SortExpression="Rating" />
                                <asp:CommandField ButtonType="Button" ShowEditButton="True" />
                            </Columns>
                            <SelectedRowStyle BackColor="Yellow" />
                        </asp:GridView>
                        <asp:Label runat="server">*Note: Songs that have been vetoed have a rating of '0'.</asp:Label>
                        <asp:LinqDataSource ID="ldsRatings" runat="server" ContextTypeName="Earworm.Web.DBM.EarwormDataContext"
                            EnableUpdate="True" EntityTypeName="" TableName="Users" OnSelecting="LinqDataSourceRating_Selecting">
                        </asp:LinqDataSource>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0">
        <ProgressTemplate>
            <img src="~/Art/ajax-loader.gif" alt="Loading..." />
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>
